<template>
  <div class="about">
    {{count}} {{all}} {{all2}}
    <button @click="add">add</button>
  </div>
</template>

<script>
import { mapState } from 'vuex'
export default {
  computed: {
    ...mapState({
      count: 'count',
      all: state => state.cart.all,
      all2: state => state.product.all
    })
  },
  methods: {
    add() {
      this.$store.commit('add')
      this.$store.commit('product/add')
    }
  }
}
</script>
